calculates the aspect ratio of given width and height
